[Packetbeat] Fix Packetbeat parsing mongodb OP_MSG#40589
Merged
aleksmaus merged 10 commits intoelastic:mainfrom Sep 4, 2024
Merged
[Packetbeat] Fix Packetbeat parsing mongodb OP_MSG#40589aleksmaus merged 10 commits intoelastic:mainfrom
aleksmaus merged 10 commits intoelastic:mainfrom
Conversation
* Fixes handling OP_MSG based request/response, missing "end" timestamp and "duration" field for the event * Cleanup
Contributor
|
Pinging @elastic/sec-deployment-and-devices (Team:Security-Deployment and Devices) |
Contributor
|
This pull request does not have a backport label.
To fixup this pull request, you need to add the backport labels for the needed
|
fearful-symmetry
approved these changes
Sep 3, 2024
Contributor
fearful-symmetry
left a comment
There was a problem hiding this comment.
I don't have a lot of MongoDB context, but the code looks fine.
mjwolf
approved these changes
Sep 3, 2024
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Proposed commit message
Fix Packetbeat parsing mongodb OP_MSG
Addresses the issue #28858 that makes packetbeat unusable for any newer thatn 5.0 version of MongoDB.
The legacy "mongodb" property is not populated and probably we should not try to map the new protocol into the legacy data structures. Instead using the document from the request BSON ecoded body to populate the "query" and "request" (if requested) fields in the format compatible with the previous implmentation for now.
Checklist
CHANGELOG.next.asciidocorCHANGELOG-developer.next.asciidoc.Related issues
Screenshots
Couple of examples of OP_MSG documents with query and request fields